import request from "@/utils/request";
import qs from "qs";

export function getProjectPurchaseList(data) {
  return request({
    url:
      process.env.VUE_APP_URL1 +
      "/projectmanage_service/projectManage/interface_grouppurchaseproject_query.shtml",
    method: "post",
    data: qs.stringify(data)
  });
}

export function getCusDocs(data) {
  return request({
    url:
      process.env.VUE_APP_URL1 +
      "/projectmanage_service/projectManageInter/interface_groupcusadddocumentlist_query.shtml",
    method: "post",
    data: qs.stringify(data)
  });
}

export function addProjectPurchase(data) {
  return request({
    url:
      process.env.VUE_APP_URL1 +
      "/projectmanage_service/projectManage/interface_grouppurchaseproject_save.shtml",
    method: "post",
    data: qs.stringify(data)
  });
}

export function updateProjectPurchase(data) {
  return request({
    url:
      process.env.VUE_APP_URL1 +
      "/projectmanage_service/projectManage/interface_grouppurchaseproject_update.shtml",
    method: "post",
    data: qs.stringify(data)
  });
}

export function getTenderList(data) {
  return request({
    url:
      process.env.VUE_APP_URL2 +
      `/admin/groupPurchaseProject/tenderList?id=${
        data.s_groupPurchaseProjectId
      }`,
    method: "post",
    data: qs.stringify(data)
  });
}

export function getFollowInfo(data) {
  return request({
    url:
      process.env.VUE_APP_URL2 +
      `/admin/groupPurchaseProject/interface_followupinfo_query?id=${data.id}`,
    method: "post",
    data: qs.stringify(data)
  });
}

export function updateFllowInfo(data) {
  return request({
    url:
      process.env.VUE_APP_URL2 +
      `/admin/groupPurchaseProject/interface_followupinfo_update`,
    method: "post",
    data: qs.stringify(data)
  });
}

export function addTender(data) {
  return request({
    url:
      process.env.VUE_APP_URL2 +
      `/admin/groupPurchaseProject/interface_tender_save`,
    method: "post",
    data: qs.stringify(data)
  });
}

export function deleteTender(data) {
  return request({
    url:
      process.env.VUE_APP_URL2 +
      `/admin/groupPurchaseProject/deleteTender?id=${data.id}`,
    method: "post",
    data: qs.stringify(data)
  });
}
